/*--------------------------------------------------------------
 * File: demo46.c 编码类型：C语言  UTF-8
 * Author WRS (1352509846@qq.com)
 * 功能: 查找数组中最小的元素
 * Version 0.1
 * Date 2022-07-17 
 * 
 * @copyright Copyright (c) 2022
 * 
----------------------------------------------------------------*/

#include <stdio.h>

int main(int argc, char const *argv[])
{
    int array[] = {9,8,7,6,5,4,3,2,1};
    int min = array[0];

    for (int i = 1; i < sizeof(array)/sizeof(int); i++)
    {
        if(array[i]<min)
        {
            min = array[i];
        }
    }
    printf("Min = %d\n",min);
    
    return 0;
}
